package com.cd.order.jpa.domain;

import com.cd.schedule.jpa.domain.ScheduleEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

//通用订单
@Entity
@Data
@Table(name = "db_camera_order",
        indexes = {
                @Index(name = "idx_time", columnList = "time")})
@NoArgsConstructor
@AllArgsConstructor
public class CameraOrder {

    //order id
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long orderId;

    //name 漫展名或棚子+角色名 自由发挥
    @Column(name = "name", length = 30, columnDefinition = "VARCHAR(30)")
    private String name;

    //场地 icg/bw/外景/棚
    @Column(name = "place", length = 50, columnDefinition = "VARCHAR(50)")
    private String place;

    //time YYYY-MM-ss
    @Column(name = "time", length = 12, columnDefinition = "VARCHAR(12)")
    private String time;

    //create time
    @Column(name = "create_time")
    private Date createTime;

    //客户名称
    @Column(name = "customer_name", length = 20, columnDefinition = "VARCHAR(20)")
    private String customerName;

    //客户备注 qq 还是微信 还是小红书 联系方式
    @Column(name = "customer_remark", length = 255, columnDefinition = "VARCHAR(255)")
    private String customerRemark;

    //类型 场照 外景 棚拍 其他
    @Column(name = "type", length = 10, columnDefinition = "VARCHAR(10)")
    private String type;

    //衣服类型 cos 汉服 lo jk 日常
    @Column(name = "cloth_type", length = 10, columnDefinition = "VARCHAR(10)")
    private String clothType;

    //扮演角色 仅cos有此项
    @Column(name = "cos_character", length = 20, columnDefinition = "VARCHAR(20)")
    private String cosName;

    //扮演角色对应ip
    @Column(name = "cos_ip", length = 20, columnDefinition = "VARCHAR(20)")
    private String cosIp;

    //数量 统一计数 混合单按混合单算 如3单*2 3双 不建议开这种单
    @Column(name = "num")
    private Integer num;

    //实收金额
    @Column(name = "real_price", columnDefinition = "DECIMAL(10,2)")
    private Double realPrice;

    //应付金额
    @Column(name = "all_price", columnDefinition = "DECIMAL(10,2)")
    private Double allPrice;

    //金额备注 付费单 互勉单 预约单 预约全款
    @Column(name = "price_remark", length = 50, columnDefinition = "VARCHAR(50)")
    private String remark;

    //是否有客单授权
    @Column(name = "is_show", columnDefinition = "TINYINT(1) DEFAULT 0")
    private Boolean isShow;

    //订单状态 已预约 待付定金 |已付定金 待拍摄 |已拍摄 待结尾款| 已结尾款 待返图 |已返图
    @Column(name = "status", length = 20, columnDefinition = "VARCHAR(20)")
    private String status;

    //关联日程表 对应ScheduleEntity的id
    @Column(name = "link_schedule")
    private Long linkSchedule;

    //返图链接
    @Column(name = "link_pic",length = 500, columnDefinition = "VARCHAR(500)")
    private String linkPic;


    //all price
    //已支付金额

    //订单状态
    //订单类型
}
